import java.util.Objects;

abstract class Data {

    abstract public void DisplayValue();

}

class Float extends Data {

    float value;{

        value=20165222.1234f;

    }

    public void DisplayValue(){

        System.out.println (value);

    }

}

// Pattern Classes

abstract class Factory {

    abstract public Data CreateDataObject();

}

class FloatFactory extends Factory {

    public Data CreateDataObject(){

        return new Float();

    }

}

//Client classes

class Document {

    Data data;

    Document(Factory factory){

        data = factory.CreateDataObject();

    }

    public void DisplayData(){

        data.DisplayValue();



    }

}

public class MyDoc {

    static Document d;

    MyDoc(Document d) {

        this.d = d;

    }

    public static void main(String[] args) {

        d = new Document(new FloatFactory());

        d.DisplayData();

    }

}
